<template>
	<view>
		<view class="box" style="margin: 20rpx;">
			<view>
				<image src="../../static/icons/余额.png" style="width: 100%;"></image>
			</view>
			<view>
				<view style="color: gray;">您好，{{ rider.name }}骑手!</view>
				<view style="text-align: center; font-size: 35rpx; padding-top: 10rpx;">
					您当前的余额为
				</view>
				<view style="color: red; text-align: center; font-size: 50rpx; padding-top: 10rpx;">
					￥{{ rider.balance }}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user: uni.getStorageSync('xm-user'),
				rider: {}
			}
		},
		onShow(){
			this.loadRider()
		},
		methods: {
			loadRider(){
				this.$request.get("/rider/selectByUserId/"+this.user.id).then(res => {
					this.rider = res.data
				})
			}
		}
	}
</script>

<style>

</style>
